package com.example.kliven.because.fragment;

import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.kliven.because.R;
import com.example.kliven.because.activity.PhoneRecommendActivity;
import com.example.kliven.because.activity.RecommendActivity;

public class HomePageAttentionFragment extends Fragment implements View.OnClickListener {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.home_page_attention_fragment,null);

        view.findViewById(R.id.btn_phone_friend).setOnClickListener(this);
        view.findViewById(R.id.btn_suggested_user).setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_phone_friend:
                Intent ContactIntent = new Intent(getActivity(), PhoneRecommendActivity.class);
                startActivity(ContactIntent);
                break;

            case R.id.btn_suggested_user:
                Intent intent = new Intent(getActivity(), RecommendActivity.class);
                startActivity(intent);
                break;
        }
    }
}
